/**
 * 功能描述 收费行编辑
 */

define(function (require, exports, module) {
	var Component = require("grid");
	
	var fetchProperties = require("../constant/fetchProperties");
	
    var instance = {
        initComponent : function (params, widget) {
            var component = new Component({
            	parentNode : ".J-detailgrid",	
            	model : {
                    id : "detailGrid",
                    allowEdit: false,
                    columns : [{
                        name : "signUpRegister.personalInfo.idNumber",
                        label : "会员",
                    },{
                        name : "signUpRegister.personalInfo.name",
                        label : "姓名"
                    },{
                    	name : "signUpRegister.personalInfo.sex.value",
                        label : "性别"
                    },{
                    	name : "signUpRegister.personalInfo.mobilePhone",
                    	label : "手机号"
                    },{
                    	name : "signUpRegister.travelContract.productRule.product.name",
                    	label : "权证名称"
                    },{
                    	name : "signUpRegister.travelContract.memberCertificates",
                    	label : "权证号"
                    },{
                    	name : "signUpRegister.planItemGroup.payable",
                    	label : "应收金额",
                    	format:function(val){
							return Number(val).toFixed(2);
						}
                    },{
                    	name : "payable",
                    	label : "实收金额",
                    	format:function(val){
							return Number(val).toFixed(2);
						},
                    },{
                    	name : "operator.name",
                    	label : "收费人"
                    },{
                    	name : "chargeDate",
                    	label : "收费日期",
                    	format: "date",
                    },{
                    	name : "signUpRegister.exitGroup",
                    	label : "是否退团",
                    	format:function(val){
							if(val){
								return "是";
							}else{
								return "否";
							}
						}
                    },{
                    	name : "refund",
                    	label : "是否退费",
                    	format:function(val){
							if(val){
								return "是";
							}else{
								return "否";
							}
						}
                    }]
                }
            });
            widget.set("detailgrid", component);
        }
    };
    module.exports = instance;
});
